<template>
  <div>
    <div>
      公告栏
    </div>
    <div>
      members 列表
    </div>
    <el-button @click="fetchHandle">获取模拟数据1</el-button>
    <el-button @click="fetchHandle2">获取模拟数据2</el-button>
    <ul>
      <li v-for="(item, index) in testList" :key="index">{{ item }}</li>
    </ul>
  </div>
</template>

<script>
  import  { fetchMoNiList, fetchTestPostData } from "../../api/explore";

  export default {
    name: "explore",
    data() {
      return {
        testList: []
      }
    },
    methods: {
      fetchHandle() {
        fetchMoNiList({
          a: 1,
          b: 2
        }).then(res => {
          console.log(res)
          if (res.code === 200) {
            this.testList = res.data
          }
        })
      },
      fetchHandle2() {
        fetchTestPostData({
          a: 1,
          b: 2
        }).then(res => {
          console.log(res)
          if (res.code === 200) {
            this.testList = res.data
          }
        })
      }
    }
  }
</script>

<style scoped>

</style>
